import Vue from 'vue'
import Router from 'vue-router'
import login from '../views/login/index.vue'
import layout from '../layout/index.vue'
Vue.use(Router)
export const routes = [{
		path: '/',
		name: '/',
		component: layout,
		redirect: '/dashboard',
		meta: { title: "仪表盘", hidden: false,icon:'qq' },
		children: [{
			path: 'dashboard',
			name: 'dashboard',
			component: ()=>import('../views/dashboard'),
			meta: {
				title: '仪表盘',
				hidden: false,
				fixld: true,
				icon:'qq'
			}
		}]
	},
	{
		path: '/login',
		name: 'login',
		component: login,
		meta: {
			title: "登录",
			hidden: true,
			fixed: false,
			icon:'qq'
		},
	}
]
export const userRoutes = [{
	path: '/list',
	name: 'list',
	component: layout,
	redirect: '/list/oneList',
	meta: { title: "列表", hidden: false,icon:'qq' },
	children: [{
		path: 'oneList',
		name: 'oneList',
		component:  ()=>import('../views/list'),
		meta: {
			title: '列表1',
			hidden: false,
			fixld: true,
			icon:'qq'
		}
	},{
		path: 'twoList',
		name: 'twoList',
		component: ()=>import('../views/list/list2'),
		meta: {
			title: '列表2',
			hidden: false,
			fixld: true,
			icon:'qq'
		}
	}]
},{
	path: '/list2',
	name: 'list2',
	component: layout,
	redirect: '/list2/oneList1',
	meta: { title: "列表", hidden: false,icon:'qq' },
	children: [{
		path: 'oneList2',
		name: 'oneList2',
		component: login,
		meta: {
			title: '二列表1',
			hidden: false,
			fixld: true,
			icon:'qq'
		}
	},{
		path: 'twoList2',
		name: 'twoList2',
		component: login,
		meta: {
			title: '二列表2',
			hidden: false,
			fixld: true,
			icon:'qq'
		}
	}]
}]
export const adminRoutes = [{
	path: '/list',
	name: 'list',
	component: login,
	redirect: '/list/oneList',
	meta: { title: "1列表", hidden: false, },
	children: [{
		path: 'oneList',
		name: 'oneList',
		component: login,
		meta: {
			title: '1列表',
			hidden: false,
			fixld: true
		}
	}]
}]
export default new Router({
	routes: routes
})
